package com.company;

/**
 * Created with IntelliJ IDEA.
 * User: orillion
 * Date: 10.10.13
 * Time: 0:23
 * To change this template use File | Settings | File Templates.
 */
public class UserInfo {

    private String userName = "";
    private String errorText = "";
    private boolean loginFlag = false;

    public UserInfo() {

    }

    public void login(String name) {
        userName = name;
        errorText = "";
        loginFlag = true;
    }

    public void setError(String error) {
        errorText = error;
    }

    public String getUser() {
        return userName;
    }

    public String getError() {
        return errorText;
    }

    public boolean IsLogin() {
        if (loginFlag)
            return true;
        return false;
    }

    public void Logout() {
        loginFlag = false;
        userName = "";
        errorText = "";
    }
}
